package cate.game.pvp.throne.data.ko;

import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

import java.util.HashMap;
import java.util.Map;

@NoteClass("王座争霸竞猜数据")
public class TBKoBet {

	@NoteField(value = "当前竞猜的数据", detail = "如果为空说明当前没有竞猜")
	public TBKoCurBet cur;

	@NoteField("每个轮次的竞猜结果")
	public Map<Integer, BetResult> resultMap;


	public void initialize() {
		if (resultMap == null) {
			resultMap = new HashMap<>();
		}
	}

	public void clear() {
		cur = null;
		resultMap.clear();
	}

	public void addResult(int round,BetResult betResult){
		cur = null;
		resultMap.put(round, betResult);
	}


	public static class BetResult {

		@NoteField("胜利方")
		public byte winner;

		@NoteField("赔率")
		public double odd;
	}
}
